﻿using ProjectScheduling_web.model;

namespace ProjectScheduling_web.dao
{
    public class PreparedStaffDao : BaseDao<PreparedStaff>
    {
        public readonly static PreparedStaffDao Base = new();
        public List<PreparedStaff> FindStaffList(DateTime start, DateTime end, int staffId)
        {
            return Db.Queryable<PreparedStaff>().InnerJoin<PreparedData>((a,b)=>a.PreparedId==b.Id).Where((a, b) => b.FromDate > start && b.FromDate < end && a.StaffId == staffId).Select<PreparedStaff>().ToList();
        }
    }
}
